{include file="public/header" /}

 <main class="thinkask-main">
     
    <div class="container">
      <div class="row">
        
        <section class="col-lg-9">
            <article class="page page-default  article-detail">
                <header class="page-heading">
                  <h1 class="title">{$title}</h1>
                  <div class="info clearfix">
                    <ul>
                      <li><i class="user"></i><span>{$user_name}</span></li>
                      <li><i class="time"></i><time>{:date_friendly($add_time,604800,'Y-m-d')}</time></li>
                      <li><i cite="views"></i><span class="views"></span></li>
                      <li><i cite="comment-count"></i><span class="comment-count"></span></li>
                    </ul>
                       
                  </div>
                </header>
            
                <div class="page-body space">
                   <div class="article-detail-content">
                     {:htmlspecialchars_decode($message)} 
                   </div>
                </div>
            </article>
         
            <section class="thinkask-comments">
                <div class="comment-heading">
                  <h3 class="title">评论 <span class="num badge">{:count($comment)}</span></h3>
                </div>
                <div class="comments-body">

                <!-- 评论 -->
                {if condition="$userinfo['uid']"}
                   <div style="overflow:hidden;">
                      <div class="form-group" style="">    <!--  -->
                        <div class="col-sm-13">
                            <textarea id="{$id}" atuid="{$uid}" name="comment" class="form-control" required="" aria-required="true"></textarea>
                        </div>
                     </div>
                     <a  class="btn btn-info pull-right article-btn">提交</a>
                   </div>
                  {/if}
                <!-- 评论 -->
                    <div style="clear:both;border-bottom: 1px solid #efefef;margin-top:10px;"></div>

                  <ul class="comments">
                    {volist name="$comment" id="v"}
                    <li class="comment">
                      <div class="comment-img">
                        <img src="{$Think.__STATIC__}{$v.avatar_file}" width="25px;">
                      </div>
                      <div class="comment-body">
                        <div class="comment-info">
                            <span class="comment-author">{$v.user_name}</span>
                            <span class="comment-date">{:date_friendly($v['add_time'])}</span>
                        </div>
                        <div class="comment-text">{$v.message} </div>
                        <!-- //修改评论 S-->
                        <div class="comment-edit edit{$v.id}" style="overflow:hidden;display:none;" >
                            <div class="form-group" >    <!--  -->
                              <div class="col-sm-13">
                                  <textarea id="{$v.id}" name="edit_comment" class="form-control" required="" aria-required="true">{$v.message}</textarea>
                              </div>
                           </div>
                           <a  class="btn btn-info pull-right c_edit">提交</a>
                        </div>
                         <!-- //修改评论 E-->
                        <div class="comment-details">
                        <div class="pull-left">
                            
                            <!-- <a class="btn btn-xs btn-default"><i class="fa fa-heart"></i> 收藏</a> -->
                            <!-- <a class="btn btn-xs btn-primary"><i class="fa fa-pencil"></i> 评论</a> -->
                        </div>
                            {if condition="$v['zhan']=='Y'"}
                            <!-- <a href="javascript:;"  class="comment-status comment-status-pending "> -->
                            <a class="btn btn-xs btn-default" id="{$v.id}"><i class="fa fa-thumbs-up" style="color:#18a689"></i> {$v.votes}赞 </a>
                            {else}
                            <a class="btn btn-xs btn-default c_zhan" id="{$v.id}"><i class="fa fa-thumbs-up "></i> {$v.votes}赞 </a>
                            {/if}
                            {if condition="$v['uid']==$userinfo['uid']||$userinfo['uid']=='1'"}
                            <ul class="comment-actions">
                                <li>
                                    <a href="javascript:;" class="c_edit_show" showarea="edit{$v.id}">编辑</a>
                                    <script type="text/javascript">
                                    $('.c_edit_show').click(function(event) {
                                     $("."+$(this).attr('showarea')).show();
                                    });
                                    </script>
                                </li>
                          
                                <li>
                                    <a href="javascript:;" table="{:encode('article_comments')}" class="cmzdel" where="id-{$v.id}">删除</a>
                                </li>
                            </ul>
                            {/if}
                        </div>
                      </div>
                    </li>
                    
                   {/volist}
                  </ul>
                </div>
              </section>   
                  
        </section>
        <aside class="col-lg-3">
             <section class="box">
              <div class="box-heading">
                <h3>相关文章</h3>
              </div>
              <div class="box-body">
                <ul class="list-unstyled">
                  <li><a href="">到底什么样的人才算是一个失败者？</a></li>
                  <li><a href="">为什么你觉得已经说明白了，可对方还是不明白？</a></li>
                  <li><a href="">“都不容易”：一位国企外联部长眼里的“做事套路”</a></li>
                  <li><a href="">互联网巨头公司蒋介石如何获得知名美元基金宋美龄的投资</a></li>
                  <li><a href="">互联网巨头公司蒋介石如何获得知名美元基金宋美龄的投资</a></li>
                </ul>
              </div>
            </section>
        </aside>
        

      </div>
    </div>
</main>
{include file="public/footer" /}